﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using TutorialLinqToSql.Models;

namespace TutorialLinqToSql.Controllers
{
    [HandleError]
    public class HomeController : Controller
    {
        public ActionResult Index()
        {
            var dataContext = new MovieDataContext();
            var movies = from m in dataContext.Movies
                         select m;
            return View(movies);
        }

        public ActionResult About()
        {
            return View();
        }
    }
}
